package leecode

func cuttingBambooLCR(bamboo_len int) int {
	if bamboo_len == 2 || bamboo_len == 1 {
		return 1
	}
	if bamboo_len == 3 {
		return 2
	}
	result := 1
	for bamboo_len > 4 {
		//尽可能分出最多的3
		result = (result * 3) % (1e9 + 7)
		bamboo_len -= 3
	}
	result *= bamboo_len
	return result % (1e9 + 7)
}
